package main

import (
	"fmt"

	"go.mod/friend"
)

func main() {

	//fmt.Println("add=", Add(1, 2, 3, 4, 5)) //15

	friends, err := friend.Find("附近的人",
		friend.WithSex(1),
		friend.WithAge(30),
		friend.WithHeight(160),
		friend.WithWeight(55),
		friend.WithHobby("爬山"))

	if err != nil {
		fmt.Println(err)
	}

	fmt.Println(friends)
}

// 可变参数传递
func Add(a int, args ...int) (result int) {
	result += a
	for _, v := range args {
		result += v
	}
	return
}
